const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  // 配置user模块中的token
  token: state => state.user.token,
  // userId快捷访问, 目的就是在permission.js内判断用户信息有没有被获取过
  userId: state => state.user.userInfo.userId,
  // name快捷访问
  username: state => state.user.userInfo.username,
  // staffPhoto快捷访问
  staffPhoto: state => state.user.userInfo.staffPhoto,
  // 公司id的快捷访问
  companyId: state => state.user.userInfo.companyId
}
export default getters

// import { mapGetters, mapState } from "vuex"

// export default {
//   computed: {
//     ...mapGetters(['sidebar', 'device']),
//     ...mapState('app', ['sidebar', 'device'])
//   }
// }
